package com.ruyixing.shopmanager.utils;

import android.util.Log;

import com.ruyixing.shopmanager.Config;

/**
 * log帮助类
 * 
 * @author laiwenjie
 * @date 2012-12-6
 */
public class LogUtils {

	public static String makeLogTag(final Object target) {
		return "WalkTr." + target.getClass().getSimpleName();
	}

	public static String makeLogTag(final Class<?> target) {
		return "WalkTr." + target.getSimpleName();
	}

	public static String makeLogTag(final String tag) {
		return "WalkTr." + tag;
	}

	public static void LOGD(final String tag, String message) {
		if (Config.DEBUG) {
			Log.d(tag, message);
		}
	}

	public static void LOGD(final String tag, String message, Throwable cause) {
		if (Config.DEBUG) {
			Log.d(tag, message, cause);
		}
	}

	public static void LOGV(final String tag, String message) {
		if (Config.DEBUG) {
			Log.v(tag, message);
		}
	}

	public static void LOGV(final String tag, String message, Throwable cause) {
		if (Config.DEBUG) {
			Log.v(tag, message, cause);
		}
	}

	public static void LOGI(final String tag, String message) {
		if (Config.DEBUG) {
			Log.i(tag, message);
		}
	}

	public static void LOGI(final String tag, String message, Throwable cause) {
		if (Config.DEBUG) {
			Log.i(tag, message, cause);
		}
	}

	public static void LOGW(final String tag, String message) {
		Log.w(tag, message);
	}

	public static void LOGW(final String tag, String message, Throwable cause) {
		Log.w(tag, message, cause);
	}

	public static void LOGE(final String tag, String message) {
		Log.e(tag, message);
	}

	public static void LOGE(final String tag, String message, Throwable cause) {
		Log.e(tag, message, cause);
	}

	private LogUtils() {
	}
}
